<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">

    <f:metadata>
        <f:viewParam name="id" value="#{recoveryBean.passwordRRUuid}"/>
    </f:metadata>

    <ui:composition template="/WEB-INF/templates/defaultTemplate.xhtml">
        <ui:define name="title">
            #{i18nRecoveryForm['title']}
        </ui:define>
        <ui:define name="content">
            <div id="content">
                <h2>#{i18nRecoveryForm['main.title']}</h2>
                <h3>#{i18nRecoveryForm['section.title']}</h3>
                <h:form>
                    <h:inputHidden value="#{recoveryBean.passwordRRUuid}"/>
                    <fieldset>
                        <label for="newPassword">#{i18nRecoveryForm['section.newPassword']}* :</label>
                        <h:inputSecret label="#{i18nRecoveryForm['section.newPassword']}" binding="#{newPasswordInput}" id="newPassword" value="#{recoveryBean.newPassword}" immediate="true" required="true" size="20" maxlength="50"/>

                        <label for="confirmPassword">#{i18nRecoveryForm['section.confirmPassword']}* :</label>
                        <h:inputSecret label="#{i18nRecoveryForm['section.confirmPassword']}" binding="#{confirmPasswordInput}" id="confirmPassword" immediate="true" required="true" size="20" maxlength="50"/>

                        <h:inputHidden value="true">
                            <f:validator validatorId="samePasswordValidator" />
                            <f:attribute name="newPasswordInput" value="#{newPasswordInput}" />
                            <f:attribute name="confirmPasswordInput" value="#{confirmPasswordInput}" />
                        </h:inputHidden>
                        <hr/>
                        <h:commandButton styleClass="button" action="#{recoveryBean.changePassword}" value="#{i18nRecoveryForm['section.send']}" alt="#{i18nRecoveryForm['section.send']}"/>
                    </fieldset>
                </h:form>
            </div>
        </ui:define>

    </ui:composition>
</html>
